#pragma once
#include "Headers.h"
#include "ViewportGrid.h"
#include "EditorAxis.h"

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace WeifenLuo::WinFormsUI::Docking;

namespace OgreUnified {

	public ref class SceneViewForm : public WeifenLuo::WinFormsUI::Docking::DockContent
	{
	public:
		SceneViewForm(int id,SceneManager* sceneMgr);
		void update();

	protected:
		~SceneViewForm();

	private: 
		SceneManager*	mSceneMgr;
		RenderWindow*	mRenderWin;
		Camera*			mCamera;
		Viewport*		mViewport;
		ViewportGrid*	mViewportGrid;
		Point			mPrevMousePos;
		RaySceneQuery*	m_pray_scene_query;


		EditorAxis*		mAxis;
		float			mCamSpeed;
		bool mCtrl, mShift, mAlt;
		bool mMiddleButton, mLeftButton, mRightButton;
		
		System::Windows::Forms::PictureBox^  mPictureBox;
		System::ComponentModel::Container ^components;
		void InitializeComponent(void);

		void On_KeyDown(Object^ sender, KeyEventArgs^ e);
		void On_KeyUp(Object^ sender, KeyEventArgs^ e);
		void On_KeyPressed(Object^ sender, KeyPressEventArgs^ e);
		void On_MouseEnter(Object^ sender, EventArgs^ e);
		void On_MouseLeave(Object^ sender, EventArgs^ e);
		void On_MouseMove(Object^ sender, MouseEventArgs^ e);
		void On_MouseClick(Object^ sender, MouseEventArgs^ e);
		void On_MouseDown(Object^ sender, MouseEventArgs^ e);
		void On_MouseUp(Object^ sender, MouseEventArgs^ e);
		void On_MouseWheel(Object^ sender, MouseEventArgs^ e);
		void On_MouseDoubleClick(Object^ sender, MouseEventArgs^ e);

	};
}
